<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="format-detection" content="email=no"/>
    <meta charset="UTF-8">
    <script type="text/javascript" th:src="@{${session.baseUrl}+'js/common.js'}"></script>
    <script th:src="@{${session.baseUrl}+'js/jquery.js'}"></script>
    <link th:href="@{${session.baseUrl}+'style/reset.css'}" rel="stylesheet" type="text/css">
    <link th:href="@{${session.baseUrl}+'style/base.css'}" rel="stylesheet" type="text/css">
    <link th:href="@{${session.baseUrl}+'style/header.css'}" rel="stylesheet" type="text/css">
    <link rel="stylesheet" th:href="@{${session.baseUrl}+'style/coupon.css'}"/>
    <title>选择优惠券</title>

</head>
<body>
<header><span onclick="javascript:history.go(-1)"></span>选择优惠券</header>

<input id="money" type="hidden" th:value="${money}">
<input id="projectId" type="hidden" th:value="${projectId}">
<input id="orderId" type="hidden" th:value="${orderId}">

    <ul  id="content0" class="content">
        <li th:each="cou,iterStat : ${CouponList}">
           <div th:onclick="'javascript:xuan(\''+${cou.id}+'\')'">
               <h1 class="f28 wh pl10">优惠券</h1>
               <p class="money"><span>年化率</span><span th:text="${#numbers.formatDecimal(100*cou.rate,1,2)}+'%'"></span><span th:text="${cou.typee==0}?'指定项目使用':'通用优惠券'"></span></p>
               <span th:if="${cou.typee==0}"><span class="f20 wh" th:text="${cou.projectName}"></span><span class="f20 wh">指定优惠券</span></span>
           </div>
        </li>
    </ul>





<script type="text/javascript" th:inline="javascript">
    var basePath = /*[[${#httpServletRequest.getScheme() + "://" + #httpServletRequest.getServerName() + ":" + #httpServletRequest.getServerPort() + #httpServletRequest.getContextPath()}]]*/;


    function xuan(obj) {
        window.location.href = basePath + '/wap/memberProject/topay?projectId=' + $('#projectId').val() + "&money=" + $('#money').val() + "&orderId=" + $('#orderId').val()+ "&couponId=" + obj.toString();
    }


</script>
</body>
</html>